home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Magazin/MacEasy 5
/
Mac Magazin and MacEasy Magazine CD - Issue 05.iso
/
Sharewarebibliothek
/
Entwickler
/
demoCdef 120 ƒ
/
About cdef3D
< prev
next >
Wrap
Text File
|
1994-09-26
|
2KB
|
57 lines
About cdef3D…
Note: v1.2 fixes some multiple monitor problems.
There are NO restrictions, copyrights or anything on this code. Have fun with
it, hopefully learn something.
This code is the source to the "3D Buttons" CDEF I have posted on the Internet
(jims-demoCDEF-v101.sit.hqx) and Compuserve (JSCDEF.SIT), along with some utility
routines used in all of the CDEF's in the posting.
The source and projects are Think C 6.0.1.
It is a simple CDEF, it will duplicate the behavior of the standard CDEF 0 - used
for push buttons, radio buttons and check boxes. It also adds a variation code,
4 that will produce a "Tog" button. See "About CDEFs".
It will behave properly in color environments, respecting 'cctb' resources and
using the System 7 style gray for disabled controls.
One departure from the standard CDEF 0 is that if this control is used in a
window or dialog with a non-white background, it will draw a '3D' type control.
3 Think C projects are included:
debugCDEF π
- builds a 'dummy' code resource (CDEF id=128) for use in debugging.
- you don't need to build this, the dummy CDEF is in the debug.rsrc file.
test3D π
- run the CDEF 128 as inline code to test it.
cdef3D π
- build a real CDEF after testing and debugging.
- it is set to build a CDEF id=200.
The CDEF code is contained in file cdef3D.c
There are several utility routines here that could be used in any CDEF project.
colorCDEF.c / colorCDEF.h - get 'cctb' colors
grayCDEF.c / grayCDEF.h - for disabled gray text
miscCDEF.c / miscCDEF.h - utility routines
qdCDEF.c / qdCDEF.h - get an offscreen drawing environment
and debugCDEF.c - to help with source level debugging.
The code is fairly straight forward and moderately well commented. Let me know
if you need more information.
Jim Stout
Internet : JimS@WRQ.COM (business hours)
AppleLink : WRQ (checked daily)
CompuServe : 73240,2052 (weekly or so)
AOL : JasG (weekly or so)